<?php

$iMedia = $qMedia->num_rows();

$sContent = '';

if ($iMedia === 0)
{
	?><div class="media_folder_empty"><?php echo $aMessages['admin_media_folder_empty']; ?></div><?php
}
else 
{
	for ($i = 0; $i < $iMedia; $i++)
	{
		?>
		<div class="media_item" id="media_item_<?php echo $qMedia->row($i)->media_id; ?>">
			<div class="media_thumb">
				<?php
				
				if ($qMedia->row($i)->extension_thumb === 'Y')
				{
					?>
					<img src="/assets/media/thumbs/<?php echo $qMedia->row($i)->media_subfolder; ?>/<?php echo $qMedia->row($i)->media_id; ?>.<?php echo $qMedia->row($i)->extension_ext; ?>?t=<?php echo time(); ?>" alt="<?php echo $qMedia->row($i)->media_title; ?>" />
					<?php
				}
				else 
				{
					?>
					<img src="/assets/images/<?php echo $this->sPlatform; ?>/media/<?php echo $qMedia->row($i)->extension_ext; ?>.gif" alt="<?php echo $qMedia->row($i)->media_title; ?>" />
					<?php	
				}
				
				?>
			</div>
			<div class="media_title">
				<?php echo $qMedia->row($i)->media_title; ?>
			</div>
			<?php
			if ($qMedia->row($i)->extension_thumb !== 'N')
			{
			?>
			<input type="hidden" class="media_dimension_width" value="<?php echo $qMedia->row($i)->dimension_width; ?>" />
			<input type="hidden" class="media_dimension_height" value="<?php echo $qMedia->row($i)->dimension_height; ?>" />
			<?php
			}
			?>
		</div>
		<?php	
	}
}

?>